<template>
    <a-modal v-model="messageModalShow" title="客户留言咨询" :footer="null" @cancel="messageModalCancel" ref="clientMessageModal" class="clientMessage-modal clearfix" :zIndex="zIndex">
        <clientMessage :messageType="msgType"></clientMessage>
    </a-modal>
</template>

<script>
    import clientMessage from './clientMessage.vue';//公共组件——客户咨询留言

    export default {
        props: ['msgType'],
        data() {
            return {
                zIndex: 2222222222, //zIndex是10位数，因为美恰的广告弹窗的zIndex是2147483647
                messageModalShow: false,    //公共客户咨询留言modal框是否显示隐藏

            }
        },
        computed: {
        },
        created() {
        },
        mounted() {
            //监测父组件公共组件header传过来的登录框状态
            this.$on('handleMessageModal', () => {
                this.messageModalShow = true;
            });
        },
        methods: {
            //公共客户咨询留言modal框关闭时触发
            messageModalCancel(){
                this.messageModalShow = false;
            },

        },
        components: {
            clientMessage
        }
    }
</script>

<style lang="less" type="text/less">
    body {
        .clientMessage-modal {
            .ant-modal-title{
                text-align: center;
            }
        }
    }
</style>
